home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6045 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: access4.digex.net!not-for-mail
  2. From: ell@access4.digex.net (Ell)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Pure Virtual Destructor Question
  5. Date: 10 Feb 1996 21:26:01 GMT
  6. Organization: The Universe
  7. Message-ID: <4fj2h9$f71@news4.digex.net>
  8. References: <4fecq0$k4e@news4.digex.net> <4fg2s5$r02@cnn.exu.ericsson.se> <4fgp0o$759@news4.digex.net> <311cc66a.2683598@news.interlog.com>
  9. NNTP-Posting-Host: access4.digex.net
  10. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  11.  
  12. Nicholas Scott (object@interlog.com) wrote: 
  13. : ell@access4.digex.net (Ell) writes: 
  14. : >Immediately above you are logically "defining" your "pure virtual"  :
  15. : >destructor "inside the class where it is "declared" as a pure virtual
  16. : >function.  It is _illegal_ to logically, or physically "define" a pure 
  17. : >virtual function in the class it is "declared" in.  A pure virtual 
  18. : >should 
  19.  
  20. : Nonsense... implementations can be supplied for pure virtuals...
  21. : further they can also be invoked. 
  22.  
  23. I belive I am correct in saying that it is illegal to define a pure
  24. virtual within the physical confines of the class declaring the pure
  25. virtual.  At least that is how my compiler works, and what I understand
  26. from the '92 ARM, and the C++ FAQ book.  However, you are correct in
  27. alluding to the fact that a function definition may be supplied for a pure
  28. virtual function for the class where the pure virtual has been declared. 
  29. So we both win, eh? :)
  30.  
  31. And even with this defintion, the class is abstract and can not be
  32. instantiated.  Now this is the C++ I know and like. :)
  33.  
  34. Elliott
  35.